<div class="window">
  <button (click)="close()" class="close">X</button>
  <form [formGroup]="addTableForm" (ngSubmit)="onSubmit()">
    <div class="form-field">
      <span class="iconfont icon-user"></span>
      <input
        type="text"
        formControlName="title"
        class="lucky-input-text"
        placeholder="标题"
      />
    </div>
    <div class="form-field">
      数据类型：
      <input
        type="radio"
        formControlName="type"
        value="number"
        class="lucky-input-type"
        name="type"
      />
      number
      <input
        type="radio"
        formControlName="type"
        value="string"
        class="lucky-input-type"
        name="type"
      />
      string
    </div>
    <div class="form-field" *ngIf="addTableForm.value.type === 'number'">
      <input
        type="number"
        formControlName="number"
        class="lucky-input-text input-number"
        placeholder="输入数据最大量（数字）"
      />
    </div>
    <div class="form-field" *ngIf="addTableForm.value.type === 'string'">
      <textarea
        type=""
        formControlName="string"
        class=" lucky-input-text input-string"
        placeholder="输入字符串并以英文状态下逗号分隔','"
      ></textarea>
    </div>
    <div class="submit">
      <button
        type="submit"
        [disabled]="!addTableForm.valid"
        class="lucky-radius--big"
        [ngClass]="!addTableForm.valid ? 'button--disable' : ''"
      >
        添&nbsp;&nbsp;加
      </button>
    </div>
  </form>
</div>
